package com.practice.bootdemo.config;

import com.practice.bootdemo.common.MyWebSocketClient;
import com.practice.bootdemo.common.SpringBeanUtil;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.net.URISyntaxException;

@Configuration
public class WebSocketClientConfig {
    @Bean
    public MyWebSocketClient startWebSocketClient() throws URISyntaxException {
        String uri = "ws://150.158.3.23/socket.io/?EIO=4&transport=websocket";
        return new MyWebSocketClient(uri);
    }
}